package com.zyp.bean;

import java.util.Date;
import java.util.Objects;

//学生实体类
public class Student {
    public String ID;//id代号
    private String studentID;//学号
    private String studentName;//姓名
    private String gender;//性别
    private Date birthday;//出生日期，生日
    private String mailbox;//邮箱
    private String remarks;//备注
    private String classID;//班级ID

    //分配的班级id
    public Student(String classID) {
        this.classID = classID;
    }

    public String getClassID() {
        return classID;
    }

    public void setClassID(String classID) {
        this.classID = classID;
    }



    @Override
    public int hashCode() {
        return Objects.hash(ID, studentID, studentName, gender, birthday, mailbox, remarks, classID);
    }

    public Student() {
    }

    public Student(String ID, String studentID, String studentName, String gender, Date birthday, String mailbox, String remarks) {
        this.ID = ID;
        this.studentID = studentID;
        this.studentName = studentName;
        this.gender = gender;
        this.birthday = birthday;
        this.mailbox = mailbox;
        this.remarks = remarks;
    }

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public String getStudentID() {
        return studentID;
    }

    public void setStudentID(String studentID) {
        this.studentID = studentID;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getMailbox() {
        return mailbox;
    }

    public void setMailbox(String mailbox) {
        this.mailbox = mailbox;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(ID, student.ID) &&
                Objects.equals(studentID, student.studentID) &&
                Objects.equals(studentName, student.studentName) &&
                Objects.equals(gender, student.gender) &&
                Objects.equals(birthday, student.birthday) &&
                Objects.equals(mailbox, student.mailbox) &&
                Objects.equals(remarks, student.remarks) &&
                Objects.equals(classID, student.classID);
    }

    @Override
    public String toString() {
        return "Student{" +
                "ID='" + ID + '\'' +
                ", studentID='" + studentID + '\'' +
                ", studentName='" + studentName + '\'' +
                ", gender='" + gender + '\'' +
                ", birthday=" + birthday +
                ", mailbox='" + mailbox + '\'' +
                ", remarks='" + remarks + '\'' +
                '}';
    }
}
